package com.newgrand.controller;

import com.newgrand.domain.model.I8ReturnModel;
import com.newgrand.service.EnterpriseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "客户、供应商")
@RequestMapping("/Enterprise")
@RestController
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class EnterpriseController {


    private final EnterpriseService enterpriseService;

    @ApiOperation(value = "供应商推送接口", notes = "供应商推送接口")
    @RequestMapping(value = "/Send/Supply", method = RequestMethod.GET)
    I8ReturnModel<String> sendSupply(String phid) {
        return enterpriseService.sendSupply(phid);
    }

    @ApiOperation(value = "供应商银行推送接口", notes = "供应商推送接口")
    @RequestMapping(value = "/Send/SupplyBank", method = RequestMethod.GET)
    I8ReturnModel<String> sendSupplyBank(String phid) {
        return enterpriseService.sendSupplyBank(phid);
    }

    @ApiOperation(value = "供应商批量推送接口", notes = "供应商推送接口")
    @RequestMapping(value = "/Send/Supply/Batch", method = RequestMethod.GET)
    I8ReturnModel<String> sendSupplyBatch() {
        return enterpriseService.sendSupplyBatch();
    }

    @ApiOperation(value = "供应商批量银行推送接口", notes = "供应商推送接口")
    @RequestMapping(value = "/Send/SupplyBank/Batch", method = RequestMethod.GET)
    I8ReturnModel<String> sendSupplyBankBatch() {
        return enterpriseService.sendSupplyBankBatch();
    }

    @ApiOperation(value = "客户推送接口", notes = "客户推送接口")
    @RequestMapping(value = "/Send/Custom", method = RequestMethod.GET)
    I8ReturnModel<String> sendCustom(String phid) {
        return enterpriseService.sendCustom(phid);
    }

    @ApiOperation(value = "客户银行推送接口", notes = "客户推送接口")
    @RequestMapping(value = "/Send/CustomBank", method = RequestMethod.GET)
    I8ReturnModel<String> sendCustomBank(String phid) {
        return enterpriseService.sendCustomBank(phid);
    }

    @ApiOperation(value = "客户银行删除接口", notes = "客户银行删除接口")
    @RequestMapping(value = "/Send/CustomBankDelete", method = RequestMethod.GET)
    I8ReturnModel<String> CustomBankDelete(String phid) {
        return enterpriseService.sendCustomBankDelete(phid);
    }


    @ApiOperation(value = "客户批量推送接口", notes = "客户批量推送接口")
    @RequestMapping(value = "/Send/Custom/Batch", method = RequestMethod.GET)
    I8ReturnModel<String> sendCustomBatch() {
        return enterpriseService.sendCustomBatch();
    }

    @ApiOperation(value = "客户银行批量推送接口", notes = "客户推送接口")
    @RequestMapping(value = "/Send/CustomBank/Batch", method = RequestMethod.GET)
    I8ReturnModel<String> sendCustomBankBatch() {
        return enterpriseService.sendCustomBankBatch();
    }

}
